/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       convexmesh.h
 * Author:     karooolek
 * Created on: Oct 30, 2009
 *
 **********************************************************************************************************************/

#ifndef CONVEXMESH_H_
#define CONVEXMESH_H_

#include "shape.h"
#include "vector.h"
#include "vector3.h"

namespace mGameEngine
{

/**
 * Convex mesh in three-dimensional space.
 * Convex mesh is the smallest mesh containig all specified vertices.
 */
class ConvexMesh: public Shape
{
private:
    /**
     * Vertices.
     */
    Vector<Vector3> _vertices;

public:
    /**
     * Create empty convex mesh.
     */
    ConvexMesh();

    /**
     * Create convex mesh with specified vertices.
     * @param vertices vertices.
     */
    ConvexMesh(const Vector<Vector3> &vertices);

    /**
     * Destroy convex mesh.
     */
    ~ConvexMesh();

    /**
     * Get convex mesh vertices.
     * @return convex mesh vertices.
     */
    const Vector<Vector3> & getVertices() const
    {
        return _vertices;
    }

    /**
     * Set convex mesh vertices.
     * @param vertices vertices.
     */
    void setVertices(const Vector<Vector3> &vertices)
    {
        _vertices = vertices;
    }
};

}

#endif // CONVEXMESH_H_
